nfn2dlp and nfnsolve: Normal Form Nested Programs Compiler and Solver
نویسندگان
چکیده
Normal Form Nested (NFN ) programs have recently been introduced in order to allow for enriching the syntax of disjunctive logic programs under the answer sets semantics. In particular, heads of rules can be disjunctions of conjunctions, while bodies can be conjunctions of disjunctions. Different to many other proposals of this kind, NFN programs may contain variables, and a notion of safety has been defined for guaranteeing domain independence. Moreover, NFN programs can be efficiently translated to standard disjunctive logic programs (DLP ). In this paper we present the tool nfn2dlp, a compiler for NFN programs, which implements an efficient translation from safe NFN programs to safe DLP programs. The answer sets of the original NFN program can be obtained from the answer sets of the transformed program (which in turn can be obtained by using a DLP system) by a simple transformation. The system has been implemented using the object-oriented programming language Ruby and Treetop, a language for Parsing Expression Grammars (PEGs). It currently produces DLP programs in the format of DLV. The separate script nfnsolve uses DLV as a back-end to compute answer sets for NFN programs. Thus, combining the two tools we obtain a system which supports the powerful NFN language, and is available for experiments.
منابع مشابه
nfn2dlp: A Normal Form Nested Programs Compiler
Normal Form Nested (NFN) programs have recently been introduced in order to allow for enriching the syntax of disjunctive logic programs under the answer sets semantics. In particular, heads of rules can be disjunctions of conjunctions, while bodies can be conjunctions of disjunctions. Different to many other proposals of this kind, NFN programs may contain variables, and a notion of safety has...
متن کاملnlp: A Compiler for Nested Logic Programming
nlp is a compiler for nested logic programming under answer set semantics. It is designed as a front-end translating nested logic programs into disjunctive ones, whose answer sets are then computable by disjunctive logic programming systems, like dlv or gnt. nlp offers different translations: One is polynomial but necessitates the introduction of new atoms, another is exponential in the worst c...
متن کاملA Polynomial Translation of Logic Programs with Nested Expressions into Disjunctive Logic Programs: Preliminary Report
Nested logic programs have recently been introduced in order to allow for arbitrarily nested formulas in the heads and the bodies of logic program rules under the answer sets semantics. Nested expressions can be formed using conjunction, disjunction, as well as the negation as failure operator in an unrestricted fashion. This provides a very flexible and compact framework for knowledge represen...
متن کاملIssues about the Developmet of a Disjunctive Program Solver
The development of a disjunctive program solver is described in this paper. First, the implementation of a language compiler needed to formulate discrete decisions thorough disjunctions is presented. The proposed language is implemented as a superset of the commercial mathematical program system solver GAMS. The interactions between both systems are also detailed. Finally, the steps executed to...
متن کاملEpigraph proximal algorithms for general convex programming
This work aims at partially bridging the gap between (generic but slow) “generalpurpose” convex solvers and (fast but constricted) “specialized” solvers. We develop the Epsilon system, a solver capable of handling general convex problems (inputs are specified directly as disciplined convex programs); however, instead of transforming these problems to cone form, the compiler transforms them to a...
متن کامل